package com.newtouch.bxzs.business.message.threadtask;


import com.newtouch.bxzs.business.product.model.ProductAppVO;
import com.newtouch.bxzs.business.product.service.ProductService;

import java.util.concurrent.Callable;

/**
 * ProductTask: 获取产品列表task
 *
 * <p>
 * <b>History:</b>
 * <table border="1">
 * <tr>
 * <th>Date</th>
 * <th>Operator</th>
 * <th>Memo</th>
 * </tr>
 * <tr>
 * <td>2021/1/21 16:13</td>
 * <td>tianshangzhu</td>
 * <td>Create</td>
 * </tr>
 * </table>
 *
 * @author tianshangzhu
 * @version 1.0.0
 * @since 1.0.0
 */

public class ProductTask implements Callable<Object> {
    private final ProductService productService;

    public ProductTask(ProductService productService) {
        this.productService = productService;
    }


    /**
     * 产品列表查询
     *
     * @return Object
     */
    @Override
    public Object call() {
        // 封装查询承参数
        ProductAppVO productAppVO = new ProductAppVO();
        productAppVO.setCurrentPage(1);
        productAppVO.setPageSize(10);
        // 执行查询
        return productService.getProductListOnApp(productAppVO);
    }
}
